package com.tingyuge.base.thread.wang.chapter8;

import java.util.Arrays;
import java.util.Optional;

/**
 * Created by xiaodao
 * date: 2019/11/29
 */
public class Test2 {

    public void test(){
        Arrays.asList(Thread.currentThread().getStackTrace()).stream().filter(e->!e.isNativeMethod())
                .forEach(e-> Optional.of(e.getClassName()+"--"+e.getMethodName()+"--"+e.getLineNumber()).ifPresent(System.out::println));
        System.out.println("Test2.test");
    }
}
